package com.example.prototypepattern.entity;

/**
 * @author ash
 * @description 简历
 * @create 2022/12/10  18:00:54
 * @className Resume
 * @verson 1.0.0
 */
public class Resume extends ICloneable {

    private String name;
    private String sex;
    private String age;

    private WorkExperience workExperience;

    public Resume(String name) {
        this.name = name;
        workExperience = new WorkExperience();
    }


    //设置个人信息
    public void SetPersonalInfo(String sex, String age) {
        this.sex = sex;
        this.age = age;
    }

    public WorkExperience getWorkExperience() {
        return workExperience;
    }

    public void setWorkExperience(WorkExperience workExperience) {
        //深复制
        this.workExperience = (WorkExperience)workExperience.clone();
    }



    //显示
    public void Display() {
        System.out.println(name + sex + age);
        System.out.println("工作经历:" + this.workExperience.getTimeArea() + this.workExperience.getCompany());
    }


}
